import com.proalias.particles.Emitter;
/**
 * @author Alias Cummins
 */
class com.proalias.particles.FloatParticle extends MovieClip{
	
	public var vx:Number;
	public var vy:Number;
	public var startX:Number;
	public var master:Emitter;

	public var life : Number;

	public var startT : Number;
	
	public function FloatParticle(){
	//trace("FloatParticle.FloatParticle()");
	};
	
	public function init(x:Number,y:Number,vx:Number,vy:Number,master:Emitter,life:Number) : Void {
		_x = x;
		_y = y;
		startX = x;
		startT = master.t;
		this.vx = vx;
		this.vy = vy;
		this.master = master;
		this.life = life;
	}
	
	public function step() : Void {
		//trace("FloatParticle.step()::"+_name);
		var fx:Number = (Math.cos(master.t/50));
		//trace("FloatParticle.step::vx="+vx);
		//trace("FloatParticle.step::fx="+fx);
		this._x = startX + fx * vx * 10;
		this._y -= vy;
	}
	
	public function die():Void{
		//trace("FloatParticle.die()");
		removeMovieClip(this);
	}
};